// 统一在这里面发送和登录相关的请求
import axios from '@/utils/require'
//登录请求
export function login(data:{loginname:string,password:string}){
    // http://localhost:3001/api/user/login
    return axios({
        url:"/user/login",
        method:"post",
        data
    })
}
//校验手机号码是否注册
export function checkPhone(data:{tel:string}){
    // http://localhost:3001/api/user/login
    return axios({
        url:"/user/docheckphone",
        method:"post",
        data
    })
}
//校验短信验证码
export function dosendmsgcode(data:{tel:string}){
    // http://localhost:3001/api/user/login
    return axios({
        url:"/user/dosendmsgcode",
        method:"post",
        data
    })
}
//校验短信验证码
export function docheckcode(data:{tel:string,telcode:string}){
    // http://localhost:3001/api/user/login
    return axios({
        url:"/user/docheckcode",
        method:"post",
        data
    })
}
//完成注册
export function dofinishregister(data:{tel:string,password:string}){
    // http://localhost:3001/api/user/login
    return axios({
        url:"/user/dofinishregister",
        method:"post",
        data
    })
}